﻿using UnityEngine;
using System.Collections;

public class FollowPlayer : MonoBehaviour {

    public GameObject hider = null;
    public GameObject seeker = null;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {

        if (GameState.Instance.GetState() == State.HidingPhase)
        {
            transform.position = new Vector3(hider.transform.position.x, hider.transform.position.y, transform.position.z);
        }
        else if (GameState.Instance.GetState() == State.SeekingPhase)
        {
            transform.position = new Vector3(seeker.transform.position.x, seeker.transform.position.y, transform.position.z);
        }
	}
}
